package com.example.zhunongzonghe.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("zn_shoppingcart")
public class ZnShoppingcart implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 购物车表
     */
    @TableId(value = "shopping_id", type = IdType.AUTO)
    private Integer shoppingId;

    /**
     * 商品id
     */
    @TableField("farm_id")
    private Integer farmId;
    /**
     * 规格ID
     */
    @TableField("spec_id")
    private Integer specId;
    /**
     * 数量
     */
    @TableField("count")
    private Integer count;

    /**
     * 加购用户
     */
    @TableField("username")
    private String username;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;


}
